<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>连续解构赋值</title>
</head>
<body>
<script type="text/javascript">
    let obj = {a: 1, b: {c: 2}}

    // 标准的解构赋值
    // const {c} = obj.b
    // console.log(c)

    // 连续解构赋值
    // const {b: {c}} = obj
    // console.log(c)

    // 连续解构赋值 + 重命名
    const {b: {c: value}} = obj
    console.log(value)
</script>
</body>
</html>
